import request from '@/utils/request'

export function postCouponAdminGiveList(data) {
  return request({
    url: '/coupon/give/admin',
    method: 'post',
    data
  })
}

export function getCouponList(data) {
  return request({
    url: '/coupon/list',
    method: 'get',
    data
  })
}

export function getProductList(data) {
  return request({
    url: '/coupon/product/list',
    method: 'get',
    data
  })
}

export function postCoupon(data) {
  return request({
    url: '/coupon',
    method: 'post',
    data
  })
}

export function putCoupon(data) {
  return request({
    url: '/coupon',
    method: 'put',
    data
  })
}

export function deleteCoupon(data) {
  return request({
    url: '/coupon',
    method: 'delete',
    data
  })
}

export function getUserCouponList(data) {
  return request({
    url: '/coupon/user/list',
    method: 'get',
    data
  })
}

export function postUserCoupon(data) {
  return request({
    url: '/coupon/user',
    method: 'post',
    data
  })
}

export function putUserCoupon(data) {
  return request({
    url: '/coupon/user',
    method: 'put',
    data
  })
}

export function deleteUserCoupon(data) {
  return request({
    url: '/coupon/user',
    method: 'delete',
    data
  })
}

export function getCouponRecordList(data) {
  return request({
    url: '/coupon/record/list',
    method: 'get',
    data
  })
}

export function postCouponRecord(data) {
  return request({
    url: '/coupon/record',
    method: 'post',
    data
  })
}

export function putCouponRecord(data) {
  return request({
    url: '/coupon/record',
    method: 'put',
    data
  })
}

export function deleteCouponRecord(data) {
  return request({
    url: '/coupon/record',
    method: 'delete',
    data
  })
}
